Ditch Redcarpet in favor of the already in user Kramdown.

Guilherme J. Tramontina 9 years ago
parent
commit
74a882482a
3 changed files with 1 additions and 5 deletions
  1. 0 1
      Gemfile
  2. 0 2
      Gemfile.lock
  3. 1 2
      app/helpers/markdown_helper.rb

+ 0 - 1
Gemfile

@@ -85,7 +85,6 @@ gem 'feed-normalizer'
85 85
 gem 'slack-notifier', '~> 0.5.0'
86 86
 gem 'therubyracer', '~> 0.12.1'
87 87
 gem 'mqtt'
88
-gem 'redcarpet', '~> 3.1.1'
89 88
 
90 89
 group :development do
91 90
   gem 'binding_of_caller'

+ 0 - 2
Gemfile.lock

@@ -233,7 +233,6 @@ GEM
233 233
       thor (>= 0.18.1, < 2.0)
234 234
     raindrops (0.13.0)
235 235
     rake (10.3.2)
236
-    redcarpet (3.1.2)
237 236
     ref (1.0.5)
238 237
     rest-client (1.6.7)
239 238
       mime-types (>= 1.16)
@@ -405,7 +404,6 @@ DEPENDENCIES
405 404
   rack
406 405
   rails (= 4.1.4)
407 406
   rails_12factor
408
-  redcarpet (~> 3.1.1)
409 407
   rr
410 408
   rspec (~> 2.99)
411 409
   rspec-collection_matchers

+ 1 - 2
app/helpers/markdown_helper.rb

@@ -1,8 +1,7 @@
1 1
 module MarkdownHelper
2 2
 
3 3
   def markdown(text)
4
-    markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML)
5
-    markdown.render(text).html_safe
4
+    Kramdown::Document.new(text, :auto_ids => false).to_html.html_safe
6 5
   end
7 6
 
8 7
 end